
// <copyright file="Department1.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   Class Department1.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Tests.DummyClasses
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    ///     Class Department1.
    /// </summary>
    [Serializable]
    public class Department1
    {
        #region Constructors and Finalizers

        /// <summary>
        ///     Initializes a new instance of the <see cref="Department1" /> class.
        /// </summary>
        public Department1()
        {
            this.Employees = new List<Employee1>();
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        ///     Gets or sets the employees.
        /// </summary>
        /// <value>The employees.</value>
        public List<Employee1> Employees { get; set; }

        /// <summary>
        ///     Gets or sets the unique identifier.
        /// </summary>
        /// <value>The unique identifier.</value>
        public int Id { get; set; }

        /// <summary>
        ///     Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        #endregion Public Properties

        #region Public Methods and Operators

        /// <summary>
        ///     Builds the dummy department1.
        /// </summary>
        /// <returns>Department1.</returns>
        public static Department1 BuildDummyDepartment1()
        {
            var d = new Department1 { Name = "IT", Id = 1 };
            var r = new Random();
            int count = r.Next(20) + 5;
            for (int i = 0; i < count; i++)
            {
                var e = new Employee1 { Id = i, DateOfBirth = DateTime.Now.AddYears(-25 - i).AddDays(i), DateOfJoin = DateTime.Now.AddYears(-5 - i).AddDays(-i), EmploymentType = (EmploymentType)(i % 3), FirstName = "FN" + i, LastName = "LN" + i };
                d.Employees.Add(e);
            }

            return d;
        }

        #endregion Public Methods and Operators
    }
}
